import request from '@/utils/request'

export default {
  getOrderList(page, limit) {
    return request({
      url: `/order/getOrder/${page}/${limit}`,
      method: 'get'
    })
  },
  searchOrderList(page, limit, orderObj) {
    return request({
      url: `/order/getOrder/${page}/${limit}`,
      method: 'post',
      data: orderObj
    })
  },

  getFromAddress(addId) {
    return request({
      url: `/addressController/listAddress/${addId}`,
      method: 'get'
    })
  },
  getToAddress(addId) {
    return request({
      url: `/addressController/listAddress/${addId}`,
      method: 'get'
    })
  },
  getOneGoods(goodsId) {
    return request({
      url: `/goods/getOneGoods/${goodsId}`,
      method: 'get'
    })
  },
  updateOrderType(orderObj) {
    return request({
      url: `/order/updateOrder`,
      method: 'post',
      data: orderObj
    })
  },

  addOrderExp(orderObj){
    return request({
      url: `/order/addOrderExp`,
      method: 'post',
      data: orderObj
    })
  }

}
